package cn.com.redis.scheduler;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class SchedulerTest {
    Logger logger = LogManager.getLogger(SchedulerTest.class);
    @Scheduled(cron = "1/5 * * ? * *")
    public void test(){
        System.out.println("定时测试"+new Date());
        logger.info("123123");
    }
}
